<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'note.label', default: 'note')}"/>
    <title>note详情</title>
    <style>
    .note-editor {
        margin-left: 16.66666667%;
    }

    .note-editor {
        border: none;
        padding-top: 7px;
    }
    </style>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>Next CRM</li>
                    <li>
                        <span>note列表</span>
                    </li>
                    <li class="active">
                        <span>note详情</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                note详情
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <g:if test="${flash.message}">
            <div class="message alert alert-info" role="status">${flash.message}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                        aria-hidden="true">×</span></button>
            </div>
        </g:if>
        <g:hasErrors bean="${this.note}">
            <ul class="errors" role="alert" style="right: 4%">
                <g:eachError bean="${this.note}" var="error">
                    <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                        <g:message error="${error}"/>
                    </li>
                </g:eachError>
            </ul>
        </g:hasErrors>
        <div class="hpanel hblue">
            <div class="panel-heading">
                <div class="panel-tools">
                    <!-- <g:form resource="${this.note}" method="DELETE">
                        <g:link action="edit" class="btn btn-info btn-xs" resource="${this.note}">
                            <i class="fa fa-edit"></i>编辑</g:link>
                        <button type="button" class="deleteBtn btn btn-danger btn-xs">
                            <i class="fa fa-trash-o"></i>
                            删除
                        </button>
                    </g:form> -->
                </div>
                note详情
            </div>

            <div class="panel-body form-horizontal">
                <div class="form-group row">
                    <label class="col-md-2 control-label">主题</label>

                    <div class="col-md-8">
                        <span class="cont">${this.note?.subject}</span>
                    </div>

                </div>
                <div class="hr-line-dashed"></div>


                <div class="form-group row">
                    <g:field name="text" id="text" value="${this.note?.text}" type="hidden"/>
                    <label class="col-md-2 control-label">内容</label>

                    <div class="col-md-6" id="noteText">
                        ${this.note?.text}
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-md-2 control-label">创建人</label>

                    <div class="col-md-3">
                        <p class="form-control-static">
                            ${this.note?.createBy}
                        </p>
                    </div>
                    <label class="col-md-2 control-label">修改人</label>

                    <div class="col-md-3">
                        <p class="form-control-static">
                            ${this.note?.modifyBy}
                        </p>
                    </div>
                </div>

                <div class="hr-line-dashed"></div>

                <div class="form-group row">
                    <label class="col-md-2 control-label">创建时间</label>

                    <div class="col-md-3">
                        <p class="form-control-static">
                            <g:formatDate date="${this.note?.createdDate}"
                                          format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                        </p>
                    </div>
                    <label class="col-md-2 control-label">修改时间</label>

                    <div class="col-md-3">
                        <p class="form-control-static">
                            <g:formatDate date="${this.note?.modifiedDate}"
                                          format="yyyy-MM-dd HH:mm:ss"></g:formatDate>
                        </p>
                    </div>
                </div>

                <div class="hr-line-dashed"></div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        var text = $("#text").val();
        $('#noteText').summernote({
            airMode: true,
        }).summernote('code', text);

    })
</script>
</body>

</html>
